﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BusinessObjects.BO_GetObjects;

public partial class Controls_ListNewsTabs : Base_Controls
{
    protected void Page_Load(object sender, EventArgs e)
    {
        base.setField(Convert.ToInt32(this.Attributes["ID"]));
        if (!IsPostBack)
        {
            ObjDT = BO_portal_articles.SelectLangByCategory(base.Cur_page, base.PSize, getRequest("category_id", -1), "ARTICLES", base.Lang);
            ctAncho.HRef = "/tin-tuc/" + DigiLib.StringUtils.RemoveUnicode(ObjDT.Rows[0]["FULL_ARTICLE_TITLE"].ToString(), "-") + "-c" + ObjDT.Rows[0]["CATEGORY_ID"].ToString() + "a" + ObjDT.Rows[0]["ARTICLE_ID"].ToString() + ".htm";
            ctDescription.InnerHtml = ObjDT.Rows[0]["FULL_ARTICLE_DESCRIPTION"].ToString();
            ctImages.Src = "/upload/" + ObjDT.Rows[0]["THUMB_IMG"].ToString();
            ctReadMore.HRef = "/tin-tuc/" + DigiLib.StringUtils.RemoveUnicode(ObjDT.Rows[0]["FULL_ARTICLE_TITLE"].ToString(), "-") + "-c" + ObjDT.Rows[0]["CATEGORY_ID"].ToString() + "a" + ObjDT.Rows[0]["ARTICLE_ID"].ToString() + ".htm";
            ctTitle.InnerText = ObjDT.Rows[0]["FULL_ARTICLE_TITLE"].ToString();
            base.bindRepeater(rptData, ObjDT);
        }
    }
}